<?php
$submit=array(
    'class'=>'submit',
    'type'=>'submit',
    'value'=>'查询'
);
?><head>
    <?php $this->load->view('load_view'); ?>
</head>

<div class="col-wrap handin-wrap">
    <!--start col-->
    <div class="col handin">
        <div class="wrap-title">
            <p class="page-title">修改课程</p>
        </div>

        <p class="desc bg">
    	页面提示：管理员通过这里来修改或删除课程，结果会直接反映到课表上
        </p>
        <div class="itemtitle">
            <h3>操作步骤</h3>
            <?php $this->load->view('admin/sylloptions'); ?>
            <div class="clear"></div>
        </div>
        <div class="search">
            <?php
            echo form_open('admin/syllabus/getcourse');
            echo form_label('选择学期');
            echo form_dropdown('year',$year);
            echo form_input($submit);
            echo form_close();
            ?>
        </div>
<?php
 if($search==true){
        echo form_open('admin/syllabus/deletecourse');
        $tmpl = array (
            'table_open'          => '<table class="sortTable" id="sortTable" cellspacing="1">',
            'heading_row_start'   => '<thead><tr>',
            'heading_row_end'     => '</tr></thead>',
            'heading_cell_start'  => '<th><p>',
            'heading_cell_end'    => '</p></th>',
            'table_close'         => '</table>'
        );
        $this->table->set_template($tmpl);
        $this->table->set_heading('删？','课程序号','课程名称','老师','操作');
        echo $this->table->generate($course);
        ?>
        <p class="control">
            <a id="selectAll" href="javascript:">全选</a>
            <a id="selectNone" href="javascript:">不选</a>
            <input type="hidden" name="currentyear" value="<?php echo $currentyear; ?>" />
            <input type="submit" id="deleteCourse" class="submit" value="删除？" />
        </p>
        <?php 
            echo form_close();
 }else{
         ?>
        <p class="desc">搜索查看结果..</p>
        <?php } ?>
    </div>
    <!--end col-->
</div>
<!--end col-wrap-->
<script>
    $('ul.selectNav li#getcourse').addClass('current');
    $(window.parent.document).find("ul.nav li a").removeClass("then");
    $(window.parent.document).find("a#syllabus").attr("class","then");
</script>
